<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增项目进度描述')"/>
    <th:block th:include="include :: summernote-css"/>
    <style>
        .label-left {
            padding-top: 7px;
            margin-bottom: 0;
            text-align: left;
        }
        .div-content {
            word-wrap: break-word;margin-bottom: 0;border-bottom: solid 1px #ccc;margin-top: 10px;
        }
    </style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m-t" id="form-progress-add">
        <input name="projectId" th:value="${projectId}" type="hidden">
        <div class="form-group">
            <label style="font-weight: bold;">项目进展</label>
            <textarea class="form-control" name="progressContent"></textarea>
        </div>
        <div class="form-group">
            <label style="font-weight: bold;">技术协议进展</label>
            <textarea class="form-control" name="technicalAgreementProgress"></textarea>
        </div>
        <div class="form-group" style="margin: 15px 0 -15px -15px;">
            <label class="col-sm-12" style="font-weight: bold;">进展记录</label>
        </div>
        <hr>
        <div class="col-sm-6" style="margin-bottom: 0; border: #CCCCCC solid 1px">
            <div class="form-group" style="margin-bottom: 0; border-bottom: #CCCCCC solid 1px">
                <label class="col-sm-4 label-left" style="font-weight: bold;">日期</label>
                <div class="label-left col-sm-8" style="font-weight: bold;">项目进展</div>
            </div>
            <div class="form-group div-content" th:each="progress: ${progressList}">
                <label class="col-sm-4 label-left"
                       th:text="${#dates.format(progress.createTime, 'yyyy-MM-dd')}"></label>
                <div class="form-control-static col-sm-8" th:utext="${progress.progressContent}"></div>
            </div>
        </div>
        <div class="col-sm-6" style="margin-bottom: 0; border: #CCCCCC solid 1px">
            <div class="form-group" style="margin-bottom: 0; border-bottom: #CCCCCC solid 1px">
                <label class="col-sm-4 label-left" style="font-weight: bold;">日期</label>
                <div class="label-left col-sm-8" style="font-weight: bold;">技术协议进展</div>
            </div>
            <div class="form-group div-content" th:each="progress: ${technicalAgreementProgressList}">
                <label class="col-sm-4 label-left"
                       th:text="${#dates.format(progress.createTime, 'yyyy-MM-dd')}"></label>
                <div class="form-control-static col-sm-8" th:utext="${progress.progressContent}"></div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: summernote-js"/>
<script th:inline="javascript">
    var prefix = ctx + "projects/progress"
    $("#form-progress-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-progress-add').serialize());
        }
    }
</script>
</body>
</html>